package com.github.ecbp.user.service.api;

import com.github.ecbp.common.req.BaseIdDTO;
import com.github.ecbp.common.req.BaseIdListDTO;
import com.github.ecbp.user.service.request.FindAdminPasswordReq;
import com.github.ecbp.user.service.response.AdminRes;
import com.github.ecbp.user.service.response.RoleRes;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

import static com.github.ecbp.common.constant.CacheKeyConstant.FEIGN_VERSION;


@Api(tags = "用户API")
@RequestMapping("/apis/" + FEIGN_VERSION + "/admin")
public interface AdminApi {

    @ApiOperation(value = "获取用户信息", notes = "zhangj")
    @PostMapping("/adminInfo")
    AdminRes adminInfo(BaseIdDTO param);

    @ApiOperation(value = "找回密码", notes = "zhangj")
    @PostMapping("/findPassword")
    Integer findPassword(FindAdminPasswordReq registerReq);

    @ApiOperation(value = "重新设置密码", notes = "zhangj")
    @PostMapping("/resetPassword")
    Integer resetPassword(BaseIdListDTO param);

    @ApiOperation(value = "获取指定用户的角色", notes = "zhangj")
    @PostMapping("/getRoleListByAdminId")
    List<RoleRes> getRoleListByAdminId(BaseIdDTO param);
}
